The communications industry is rapidly changing to adjust to emerging technologies and ever increasing customer demand. This customer demand for new applications and increased performance of existing applications is driving communications network and system providers to employ networks and systems having greater speed and capacity (e.g., greater bandwidth). In trying to achieve these goals, a common approach taken by many communications providers is to use packet switching technology. Longest prefix matching using ternary content-addressable memories and other data structure searching disciplines are particularly useful in performing lookup operations in determining how to process a packet in a network by a packet switching device.